package im;

import r.Rating;
import rdf.Resource;
import java.util.*;
import sioc.Forum;
public class CoreIdea extends Resource {

	private String title;
	private String description;
	private String abstrct;
	private double version;
	private Date date;
	private Forum hasForum;
	private ArrayList<String> ideaRealizations;
	private CoreIdea isNewVerionOf;
	private Status hasStatus;
	
	
	public CoreIdea(String title, String hasTagging) {
		super(hasTagging);
		this.title = title;
		ideaRealizations = new ArrayList<String>();
	}
	
	public void setHasStatus(Status hasStatus) {
		this.hasStatus = hasStatus;
	}
	
	public String getTitle() {
		return title;
	}
	
	public Status getHasStatus() {
		return hasStatus;
	}
	
	public void addIdeaRealization(String ideaRealization){
		ideaRealizations.add(ideaRealization);
	}
	
	
	public boolean hasAtLeastThreeRatings(){
		double rating = getHasRating().getValue();
		
		if(rating >= 3)
			return true;
		
		else
			return false;
	}
	
	
	public boolean hasAtLeastTwoRatings(){
		double rating = getHasRating().getValue();
		
		if(rating >= 2)
			return true;
		
		else
			return false;
	}
	
	
	public boolean hasAtLeastOneRealization(){
		if(ideaRealizations.size() >= 1)
			return true;
		
		else
			return false;
	}
	
	
	public boolean hasAtLeastTwoRatingsAndOneRealization(){
		if(hasAtLeastTwoRatings() && hasAtLeastOneRealization())
			return true;
		
		else
			return false;
	}
	
}
